package cn.edu.scau.cmi.zhangjiankun.adapter;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class AdapterOfClass extends SortUtil implements Target{
	@Override
	public List<Student> doTarget(List<Student> students) {

		List<String> numlist = new ArrayList<>();
		for(Student student:students) {
			numlist.add(student.getNum());
		}
		sortInt(numlist);
		List<Student> students2 = new ArrayList<>();
		for(String o:numlist) {
			for(Student qStudent:students) {
				if(o==qStudent.getNum()) {
					students2.add(qStudent);
					break;
				}
			}
		}
		return students2;
	}
}
